package org.lds.hotkey.console.business.worker.service;

import org.lds.hotkey.common.model.dto.ResultDTO;
import org.lds.hotkey.common.model.pojo.OrderBy;
import org.lds.hotkey.common.model.pojo.PageResult;
import org.lds.hotkey.console.business.worker.entity.Worker;
import org.lds.hotkey.console.business.worker.model.request.*;
import org.lds.hotkey.console.business.worker.model.response.*;


/**
 * 基础服务类
 *
 * @author lidongsheng
 * @since 2024-06-05
 */
public interface WorkerBaseService {
    /**
     * 创建
     */
    ResultDTO<WorkerBaseResponse> createWorker(WorkerBaseCreateRequest request);

    /**
     * 批量创建
     */
    ResultDTO<WorkerBaseBatchCreateResponse> batchCreateWorker(WorkerBaseBatchCreateRequest request);

    /**
     * 删除
     */
    ResultDTO<WorkerBaseDeleteResponse> deleteWorker(WorkerBaseDeleteRequest request);

    /**
     * 批量删除
     */
    ResultDTO<WorkerBaseBatchDeleteResponse> batchDeleteWorker(WorkerBaseBatchDeleteRequest request);

    /**
     * 更新
     */
    ResultDTO<WorkerBaseResponse> updateWorker(WorkerBaseUpdateRequest request);

    /**
     * 批量更新
     */
    ResultDTO<WorkerBaseBatchUpdateResponse> batchUpdateWorker(WorkerBaseBatchUpdateRequest request);

    /**
     * 根据ID查询
     */
    ResultDTO<WorkerBaseResponse> getWorkerById(WorkerBaseGetByIdRequest request);

    /**
     * 根据ID集合查询
     */
    ResultDTO<WorkerBaseListResponse> getWorkerByIds(WorkerBaseGetByIdsRequest request);

    /**
     * 根据业务主键查询
     */
    Worker getWorkerByKey(WorkerBaseGetByKeyRequest request);

    /**
     * 查询
     */
    ResultDTO<WorkerBaseListResponse> listWorker(WorkerBaseListRequest request);

    /**
     * 查询所有
     */
    ResultDTO<WorkerBaseListResponse> listAllWorker(OrderBy orderBy);

    /**
     * 分页查询
     */
    ResultDTO<PageResult<WorkerBaseResponse>> listWorkerPage(WorkerBaseListPageRequest request);


    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] start ******************************/

    /**
     * 异步批量创建
     */
    ResultDTO<WorkerBaseBatchCreateResponse> batchCreateWorkerAsync(WorkerBaseBatchCreateRequest request);

    /**
     * 异步批量删除
     */
    ResultDTO<WorkerBaseBatchDeleteResponse> batchDeleteWorkerAsync(WorkerBaseBatchDeleteRequest request);

    /**
     * 异步批量更新
     */
    ResultDTO<WorkerBaseBatchUpdateResponse> batchUpdateWorkerAsync(WorkerBaseBatchUpdateRequest request);

    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] end ******************************/
}